import express from 'express'
import routes from './routes';
export function runApplicationContext(port?:number,contextPath?:string){
    const rootDir = process.cwd();
    console.log("项目运行在:",rootDir)
    const app = express()
    routes(app,`${rootDir}`,contextPath)
    app.listen(port||3000)
    console.log(`server is run ! http://127.0.0.1:${port||3000}${contextPath}`)
}